package org.come.xinyuan;

import come.tool.JDialog.TiShiChuLi;
import org.come.Frame.ZhuFrame;
import org.come.entity.Goodstable;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;
import org.come.until.GoodsListFromServerUntil;

public class DuiXinYuanJDialog implements TiShiChuLi {
    public DuiXinYuanJDialog() {
    }

    @Override
    public void tipBox(boolean tishi, Object object) {
        if (tishi) {
            for (int i = 0; i < GoodsListFromServerUntil.getGoodslist().length; ++i) {
                Goodstable goodstable = GoodsListFromServerUntil.getGoodslist()[i];
                //物品sid
                if (goodstable != null && goodstable.getGoodsid().longValue() == 80167) {
                    String sendmes = Agreement.getAgreement().XinYuanAgreement("X&" + object);
                    SendMessageUntil.toServer(sendmes);
                    return;
                }
            }

            ZhuFrame.getZhuJpanel().addPrompt2("#R你的珍稀神兽碎片不足");
        }

    }

}
